﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarkPair = System.Collections.Generic.KeyValuePair<string, double>;

namespace ENG.TeachersDiary
{
  internal class MarkCodeSet
  {
    public const string CS = "1-5";
    public const string GB = "A-E";
    public const string US = "A-F";

    public static string[] GetMarkCodeSetNames()
    {
      return new string[] {
        CS, GB, US};
    }

    public static List<MarkPair> GetMarkCodeSet(string name)
    {
      List<MarkPair> ret = null;

      switch (name)
      {
        case CS:
          ret = new List<MarkPair>(){
            new MarkPair("1",1),
            new MarkPair("1-",1.5),
            new MarkPair("2",2),
            new MarkPair("2-",2.5),
            new MarkPair("3",3),
            new MarkPair("3-",3.5),
            new MarkPair("4",4),
            new MarkPair("4-",4.5),
            new MarkPair("5",5)
          };
          break;
        case GB:
          ret = new List<MarkPair>(){
            new MarkPair("A",4),
            new MarkPair("B",3),
            new MarkPair("C",2),
            new MarkPair("D",1),
            new MarkPair("E",0)
          };
          break;
        case US:
          ret = new List<MarkPair>(){
            new MarkPair("A",4),
            new MarkPair("B",3),
            new MarkPair("C",2),
            new MarkPair("D",1),
            new MarkPair("F",0)
          };
          break;
        default:
          ret = null;
          break;
      }

      return ret;
    }
  }
}
